package com.allwees.bs.c.module.user.dto;

import com.allwees.bs.c.module.merchant.dto.StoreDTO;
import com.allwees.bs.c.module.merchant.entity.StoreEntity;
import com.allwees.bs.c.module.user.entity.StoreCollectionEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
//@ApiModel
public class StoreCollectionDto implements Serializable {

//    @ApiModelProperty(value = "商店实体")
    private StoreDTO storeDto;

//    @ApiModelProperty(value = "创建时间")
    private Date createdAt;


    public StoreCollectionDto(StoreCollectionEntity entry) {
        StoreEntity storeEntity = entry.getStore();
        this.storeDto = new StoreDTO(storeEntity);
        this.createdAt = entry.getCreatedAt();
    }
}
